package com.pro.service.imple;

import com.pro.mapper.JsUiserAuthorityMapper;
import com.pro.pojo.JsUiserAuthority;
import com.pro.service.JsUiserAuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 祖铭泽
 * @Date 2021/12/1/0001
 * @description 权限用户表 业务层
 */
@Service
public class JsUiserAuthorityServiceImple implements JsUiserAuthorityService {
    @Autowired
    private JsUiserAuthorityMapper jsUiserAuthorityMapper;
    //查询后台用户所拥有的权限
    @Override
    public List<JsUiserAuthority> getUserAuthority(Integer userId) {
        return jsUiserAuthorityMapper.getUserAuthority(userId);
    }
    //删除后台用户所拥有的权限
    @Override
    public boolean deleteUserAuthority(Integer userId) {
        return jsUiserAuthorityMapper.deleteUserAuthority(userId);
    }
    //添加后台用户权限
    @Override
    public boolean addUserAuthority(JsUiserAuthority jsUiserAuthority) {
        return jsUiserAuthorityMapper.addUserAuthority(jsUiserAuthority);
    }
}
